package com.example.automanagement.mapper;

import com.example.automanagement.entity.AutoOrder;
import com.example.automanagement.entity.RepairOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface OrderArchiveMapper {

    List<AutoOrder> autoPageList();

    List<RepairOrder> repairPageList();
    @Select("select * from auto_order where auto_order_id = #{orderId}")
    AutoOrder getAutoOrderById(String orderId);
    @Select("select * from repair_order where repair_order_id = #{orderId}")
    RepairOrder getRepairOrderById(String orderId);
    @Update("update auto_order set auto_order_status = '已归档' where auto_order_id = #{autoId}")
    void updateAutoOrderStatus(String autoId);
    @Update("update repair_order set repair_order_status = '已归档' where repair_order_id = #{repairOrderId}")
    void updateRepairOrderStatus(String repairOrderId);
}
